package models

// MaGoodsActivity [...]
type MaGoodsActivity struct {
	ID           string `gorm:"autoIncrement:true;primaryKey;column:id;type:bigint;not null"  json:"id" json_old:"ID"`
	ActivityName string `gorm:"column:activity_name;type:varchar(250);not null;comment:商品名称"  json:"activity_name" json_old:"ActivityName"`
	StartTime    string `gorm:"column:start_time;type:int;size:64;not null;comment:活动开始时间"  json:"-" json_old:"StartTime"`
	EndTime      string `gorm:"column:end_time;type:int;size:64;not null;comment:活动结束时间"  json:"-" json_old:"EndTime"`
	Status       string `gorm:"column:status;type:int;size:64;not null;comment:商品状态"  json:"-" json_old:"Stauts"`
	SalesID      string `gorm:"column:sales_id;type:string;size:128;not null;comment:机器识别码"  json:"sales_id" json_old:"SalesID"`
	CreatedAt    int64  `gorm:"column:created_at;autoCreateTime;type:int;size:64;index:created_at;comment:创建时间" json:"created_at"`

	// MultiAssocGoods         string                      `gorm:"column:multi_assoc_goods;type:varchar(128);not null;comment:关联商品的ID"  json:"-" json_old:"MultiAssocGoods"`
	// MultiAssocGoodsFormated []schema.MultiAssocGoodsNew `gorm:"-" json:"multi_assoc_goods"`
}

// TableName get sql table name.获取数据库表名
func (m MaGoodsActivity) TableName() string {
	return "ma_goods_activity"
}

// 模式自动注册
func init() {
	Models = append(Models, &MaGoodsActivity{})
}
